Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/clickhouse] Add client info for identifying exporter in system.query_log #34915

Closed

Conversation

SpencerTorres
Copy link
Member

@SpencerTorres SpencerTorres commented Aug 29, 2024

Description:

This change will include information about the collector version and OS/Arch for every INSERT. Users can then track the origin of these queries in system.query_log. For an official build this will look something like otelcol/v0.114.0-lin-amd64.

This is implemented by setting client_info_product in the DSN. The underlying ClickHouse Go driver will then attach it upon connection. Users can already add their own version info in endpoint or connection_params, but this change will now safely set or append to that value with the binary's information.

Documentation:

  • Added notes to README for client_product_info

Testing:

  • Add/updated unit tests

@SpencerTorres
Copy link
Member Author

@dmitryax @crobert-1 I don't have perms to add the label, but this is ready to merge

@Frapschen
Copy link
Contributor

@SpencerTorres need to fix unit fail https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10638376113/job/29494280316?pr=34915#step:9:564

@SpencerTorres
Copy link
Member Author

Looks like my local tests were running differently, I cannot seem to figure out what SQL driver registration magic is happening, but it is all dependent on this line:

// exporter_logs.go:213
var driverName = "clickhouse" // for testing

I will investigate further and then update. This seems to only occur for the unit tests, not for integration tests

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Sep 18, 2024
@SpencerTorres
Copy link
Member Author

not stale

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 17, 2024
@SpencerTorres
Copy link
Member Author

still active

@github-actions github-actions bot removed the Stale label Oct 29, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 13, 2024
@SpencerTorres
Copy link
Member Author

Updating the solution now, not stale. Found a way to avoid breaking the entire SQL driver

@SpencerTorres SpencerTorres requested a review from a team as a code owner November 27, 2024 00:41
@SpencerTorres
Copy link
Member Author

@Frapschen @hanjm Fixed with a simplified solution, let me know if this looks good. Thanks!

@github-actions github-actions bot removed the Stale label Nov 27, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 11, 2024
@SpencerTorres
Copy link
Member Author

not stale, ready for review

@github-actions github-actions bot removed the Stale label Dec 12, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 27, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jan 10, 2025
@SpencerTorres
Copy link
Member Author

SpencerTorres commented Jan 10, 2025

not stale, will reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants